home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE05 / CONSTRUC / BOBEVENT.PAS next >
Encoding:
Pascal/Delphi Source File  |  1995-11-14  |  775 b   |  34 lines

  1. unit BobEvent;
  2. interface
  3. uses
  4.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  5.   Forms, Dialogs, StdCtrls;
  6.  
  7. type
  8.   TEventNoObject = procedure;
  9.   TEventOfObject = procedure of Object;
  10.  
  11.   TEventComponent = class(TComponent)
  12.   private
  13.     { Private declarations }
  14.     FEventNo: TEventNoObject;
  15.     FEventOf: TEventOfObject;
  16.  
  17.   published
  18.     { Published declarations }
  19.     property OnEventNoObject: TEventNoObject read FEventNo write FEventNo;
  20.                             { error: this property cannot be published }
  21.     property OnEventOfObject: TEventOfObject read FEventOf write FEventOf;
  22.   end;
  23.  
  24. procedure Register;
  25.  
  26. implementation
  27.  
  28. procedure Register;
  29. begin
  30.   RegisterComponents('Dr.Bob', [TEventComponent])
  31. end;
  32.  
  33. end.
  34.